package com.biwin.module.authority.api.dto;

import com.biwin.common.app.dto.BasicBwDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

/**
 * TODO
 *
 * @author biwin
 * @since 0.0.1
 */
@ApiModel(value = "菜单信息 - MenuDto",
        description = "新增或修改岗位的前端传参模型")
public class MenuDto extends BasicBwDto {

    @ApiModelProperty("父级菜单id")
    private Long parentId;

    @ApiModelProperty("菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    @Length(min = 2, max = 60, message = "菜单名称最少2个字符,最多60个字符")
    private String name;

    @ApiModelProperty("菜单路径")
    @NotBlank(message = "菜单功能路径不能为空")
    private String url;

    @ApiModelProperty("菜单图标")
    private String icon;

    @ApiModelProperty("菜单图标皮肤")
    private String iconSkin;

    @ApiModelProperty("是否已启用")
    @NotNull(message = "启用标识不能为空")
    private Boolean enabled;

    @ApiModelProperty("快捷访问码")
    private String quickCode;

    @ApiModelProperty("排序号")
    private Integer sort = 0;

    @ApiModelProperty("菜单类型")
    @NotNull(message = "菜单类型不能为空")
    @Min(value = 0, message = "可选范围最小为0")
    @Max(value = 3, message = "可选范围最大为3")
    private Integer menuType;

    @ApiModelProperty("访问策略")
    @NotNull(message = "访问策略不能为空")
    @Min(value = 0, message = "可选范围最小为0")
    @Max(value = 3, message = "可选范围最大为3")
    private Integer accessType;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getIconSkin() {
        return iconSkin;
    }

    public void setIconSkin(String iconSkin) {
        this.iconSkin = iconSkin;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public String getQuickCode() {
        return quickCode;
    }

    public void setQuickCode(String quickCode) {
        this.quickCode = quickCode;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getMenuType() {
        return menuType;
    }

    public void setMenuType(Integer menuType) {
        this.menuType = menuType;
    }

    public Integer getAccessType() {
        return accessType;
    }

    public void setAccessType(Integer accessType) {
        this.accessType = accessType;
    }
}
